package com.d0306.Z06;

public class Weishu {
    public static void main(String[] args) {
        int num = 123;
        int num1=num;
        int a=0;
        int length = 0;
        if (num / 10 == 0) {
            length = 1;
        }
        while(num!= 0) {
                length++;
                num/=10;
            }
           System.out.println("整数的位数为:"+length);
           System.out.print("逆序为:");
        while(num1!=0){
            a=num1%10;
            num1/=10;
            System.out.print(a);
        }

        }
    }

